package readySiteScanners;

import java.net.URL;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

import searchEngine.SearchEngine;
import AgentsDB.Agent;
import AgentsDB.AgentDataIO;

public class Kvartirant {
	static String objectFilePath = "d:\\ivan\\workspace\\SearchEngine\\WebContent\\agentSetObject";

	public static void main(String[] s)throws Exception{
		HashSet<Agent> agents = new HashSet<Agent>();
		for (int i = 1; i<20; i++){
			URL url = new URL("http://www.kvartirant.by/rent/flats/page/"+i+"/");
			Set<Agent> temp = (Set<Agent>)SearchEngine.searchAgents(url);
		
			for (Agent ag : temp) {  // d gets successively each value in ar.
				agents.add(ag);
			}

		}
		
	}
}
